#ifndef HOPFIELD_H_
#define HOPFIELD_H_

// Includes
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <stdio.h>
#include <stdlib.h>
#include "dirent.h"
#include <vector>

#define WIDTH 12
#define HEIGHT 9
#define CHANNELS 3

double** Weights; // the Weights
unsigned char** P; // the Hopfield State
std::vector<IplImage*> images; // the images vector

int getBit(char, int);

double** createWeights();
void destroyWeights();
void destroyState();
void destroyImages();

unsigned char* loadPattern(IplImage*);
IplImage* loadImage(unsigned char*);

double dot(unsigned char*, unsigned char*, int, int);



#endif /* HOPFIELD_H_ */
